//
//  Bag_CellView.m
//  K-Music
//
//  Created by LoGUYU on 16/1/15.
//  Copyright © 2016年 CHUN. All rights reserved.
//

#import "Bag_CellView.h"

@implementation Bag_CellView


- (void)makeImageName:(NSString *)imageName Title:(NSString *)title Number:(NSString *)num
{
    UIImageView * Bag_image = [[UIImageView alloc] init];
    
//    Bag_image.image = [UIImage imageNamed:imageName];
    [Bag_image sd_setImageWithURL:[NSURL URLWithString:imageName] placeholderImage:[UIImage imageNamed:@"图层-51"]];
    
    [self addSubview:Bag_image];
    
    UILabel * Bag_title = [[UILabel alloc] init];
    Bag_title.text = title;
    [self addSubview:Bag_title];
    
    UILabel * Bag_Number = [[UILabel alloc] init];
    Bag_Number.text = [NSString stringWithFormat:@"(%@)",num];
    [self addSubview:Bag_Number];
    
    [Bag_image mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_top);
        make.width.mas_equalTo(@52);
        make.height.mas_equalTo(@64);
        make.centerX.equalTo(self);
    }];
    
    [Bag_title mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(Bag_image.mas_bottom).with.offset(10);
        make.centerX.equalTo(self);
    }];
    
    [Bag_Number mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(Bag_title.mas_bottom).with.offset(5);
    }];
    
}

@end
